SLASH_AUTOMOUNT1 = "/automount";    
SlashCmdList["AUTOMOUNT"] = function() 	
	local bOnMount=1;
	local creatureID, creatureName, spellID, icon, active;
	for i=1,GetNumCompanions("MOUNT") do
		creatureID, creatureName, spellID, icon, active=GetCompanionInfo("MOUNT",i);
		if active == 1 then
			DismissCompanion("MOUNT");
			return 0;
		end
	end
	local bCanFly=IsFlyableArea();
	if bCanFly == 1 then
		CallCompanion("MOUNT",1);
	else
		CallCompanion("MOUNT",2);
	end
end 

